Optimal. Leaf size=184 \[ \frac {a^{5/2} (5 A+2 B) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {A (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{d}+\frac {a^3 (15 A+70 B+64 C) \tan (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}-\frac {a^2 (15 A-10 B-16 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 d}-\frac {a (5 A-2 C) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.28, antiderivative size = 184, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.146, Rules used = {4171, 4002,
4000, 3859, 209, 3877} \begin {gather*} \frac {a^{5/2} (5 A+2 B) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{d}+\frac {a^3 (15 A+70 B+64 C) \tan (c+d x)}{15 d \sqrt {a \sec (c+d x)+a}}-\frac {a^2 (15 A-10 B-16 C) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{15 d}-\frac {a (5 A-2 C) \tan (c+d x) (a \sec (c+d x)+a)^{3/2}}{5 d}+\frac {A \sin (c+d x) (a \sec (c+d x)+a)^{5/2}}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 3859
Rule 3877
Rule 4000
Rule 4002
Rule 4171
Rubi steps
\begin {align*} \int \cos (c+d x) (a+a \sec (c+d x))^{5/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac {A (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{d}+\frac {\int (a+a \sec (c+d x))^{5/2} \left (\frac {1}{2} a (5 A+2 B)-\frac {1}{2} a (5 A-2 C) \sec (c+d x)\right ) \, dx}{a}\\ &=\frac {A (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{d}-\frac {a (5 A-2 C) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}+\frac {2 \int (a+a \sec (c+d x))^{3/2} \left (\frac {5}{4} a^2 (5 A+2 B)-\frac {1}{4} a^2 (15 A-10 B-16 C) \sec (c+d x)\right ) \, dx}{5 a}\\ &=\frac {A (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{d}-\frac {a^2 (15 A-10 B-16 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 d}-\frac {a (5 A-2 C) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}+\frac {4 \int \sqrt {a+a \sec (c+d x)} \left (\frac {15}{8} a^3 (5 A+2 B)+\frac {1}{8} a^3 (15 A+70 B+64 C) \sec (c+d x)\right ) \, dx}{15 a}\\ &=\frac {A (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{d}-\frac {a^2 (15 A-10 B-16 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 d}-\frac {a (5 A-2 C) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}+\frac {1}{2} \left (a^2 (5 A+2 B)\right ) \int \sqrt {a+a \sec (c+d x)} \, dx+\frac {1}{30} \left (a^2 (15 A+70 B+64 C)\right ) \int \sec (c+d x) \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {A (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{d}+\frac {a^3 (15 A+70 B+64 C) \tan (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}-\frac {a^2 (15 A-10 B-16 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 d}-\frac {a (5 A-2 C) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}-\frac {\left (a^3 (5 A+2 B)\right ) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=\frac {a^{5/2} (5 A+2 B) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {A (a+a \sec (c+d x))^{5/2} \sin (c+d x)}{d}+\frac {a^3 (15 A+70 B+64 C) \tan (c+d x)}{15 d \sqrt {a+a \sec (c+d x)}}-\frac {a^2 (15 A-10 B-16 C) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{15 d}-\frac {a (5 A-2 C) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.92, size = 209, normalized size = 1.14 \begin {gather*} \frac {\cos (c+d x) (a (1+\sec (c+d x)))^{5/2} \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (\frac {60 (5 A+2 B) \text {ArcTan}\left (\sqrt {-1+\sec (c+d x)}\right ) \sin (c+d x)}{\sqrt {-1+\sec (c+d x)} (1+\sec (c+d x))^3}+\frac {\cos (c+d x) (60 A+160 B+196 C+(45 A+40 B+112 C) \cos (c+d x)+4 (15 A+40 B+43 C) \cos (2 (c+d x))+15 A \cos (3 (c+d x))) \tan \left (\frac {1}{2} (c+d x)\right )}{(1+\cos (c+d x))^2}\right )}{30 d (A+2 C+2 B \cos (c+d x)+A \cos (2 (c+d x)))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(603\) vs.
\(2(164)=328\).
time = 41.16, size = 604, normalized size = 3.28
method | result | size |
default | \(-\frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (75 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {2}+30 B \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {2}\, \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right )+150 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \cos \left (d x +c \right ) \sin \left (d x +c \right ) \sqrt {2}+60 B \cos \left (d x +c \right ) \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sqrt {2}+75 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sin \left (d x +c \right )+30 B \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sin \left (d x +c \right )+120 A \left (\cos ^{4}\left (d x +c \right )\right )+120 A \left (\cos ^{3}\left (d x +c \right )\right )+640 B \left (\cos ^{3}\left (d x +c \right )\right )+688 C \left (\cos ^{3}\left (d x +c \right )\right )-240 A \left (\cos ^{2}\left (d x +c \right )\right )-560 B \left (\cos ^{2}\left (d x +c \right )\right )-464 C \left (\cos ^{2}\left (d x +c \right )\right )-80 B \cos \left (d x +c \right )-176 C \cos \left (d x +c \right )-48 C \right ) a^{2}}{120 d \cos \left (d x +c \right )^{2} \sin \left (d x +c \right )}\) | \(604\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 2780 vs.
\(2 (164) = 328\).
time = 0.73, size = 2780, normalized size = 15.11 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.61, size = 440, normalized size = 2.39 \begin {gather*} \left [\frac {15 \, {\left ({\left (5 \, A + 2 \, B\right )} a^{2} \cos \left (d x + c\right )^{3} + {\left (5 \, A + 2 \, B\right )} a^{2} \cos \left (d x + c\right )^{2}\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) + 2 \, {\left (15 \, A a^{2} \cos \left (d x + c\right )^{3} + 2 \, {\left (15 \, A + 40 \, B + 43 \, C\right )} a^{2} \cos \left (d x + c\right )^{2} + 2 \, {\left (5 \, B + 14 \, C\right )} a^{2} \cos \left (d x + c\right ) + 6 \, C a^{2}\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{30 \, {\left (d \cos \left (d x + c\right )^{3} + d \cos \left (d x + c\right )^{2}\right )}}, -\frac {15 \, {\left ({\left (5 \, A + 2 \, B\right )} a^{2} \cos \left (d x + c\right )^{3} + {\left (5 \, A + 2 \, B\right )} a^{2} \cos \left (d x + c\right )^{2}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - {\left (15 \, A a^{2} \cos \left (d x + c\right )^{3} + 2 \, {\left (15 \, A + 40 \, B + 43 \, C\right )} a^{2} \cos \left (d x + c\right )^{2} + 2 \, {\left (5 \, B + 14 \, C\right )} a^{2} \cos \left (d x + c\right ) + 6 \, C a^{2}\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{15 \, {\left (d \cos \left (d x + c\right )^{3} + d \cos \left (d x + c\right )^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 559 vs.
\(2 (164) = 328\).
time = 2.21, size = 559, normalized size = 3.04 \begin {gather*} -\frac {15 \, {\left (5 \, A \sqrt {-a} a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 2 \, B \sqrt {-a} a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \log \left ({\left | {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - a {\left (2 \, \sqrt {2} + 3\right )} \right |}\right ) - 15 \, {\left (5 \, A \sqrt {-a} a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 2 \, B \sqrt {-a} a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \log \left ({\left | {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + a {\left (2 \, \sqrt {2} - 3\right )} \right |}\right ) + \frac {60 \, {\left (3 \, \sqrt {2} {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} A \sqrt {-a} a^{3} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - \sqrt {2} A \sqrt {-a} a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )}}{{\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} - 6 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} a + a^{2}} - \frac {4 \, {\left ({\left (\sqrt {2} {\left (15 \, A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 35 \, B a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 32 \, C a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 10 \, \sqrt {2} {\left (3 \, A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 8 \, B a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 8 \, C a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 15 \, \sqrt {2} {\left (A a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 3 \, B a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 4 \, C a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{2} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}}{30 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \cos \left (c+d\,x\right )\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{5/2}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________